﻿using System.Xml;
using Jayden.Sc2;

namespace Jayden.Dll.Sc2.Descriptions.Terran
{
	public class TerranRaceDescription : RaceDescription
	{
		public TerranRaceDescription(RaceDictionary dictionary, XmlNode raceNode)
			: base(dictionary, raceNode) { }

		protected override EntityDescription NewEntity(XmlNode node)
		{
			if (node.Name == "BuildingWithAddOn")
				return new BuildingWithAddOnDescription(this, node);
			if (node.Name == "AddOnAttached")
				return new AddOnAttachedDescription(this, node);
			return base.NewEntity(node);
		}

		public override ActionDescription NewAction(EntityDescription entity, XmlNode node)
		{
			if (node.Name == "BuildAddOn")
				return new BuildAddOnActionDescription(entity, node);
			return base.NewAction(entity, node);
		}
	}
}
